<template>
    <div>
        <ContentItem v-if="tabStore.assembly_type === 'CPU'"
            :title="props.data.manufacturers + '-' + props.data.series + '-' + props.data.code_name" :data="props.data"
            value_one_title="核心数量" :value_one="props.data.cores + '核心'" value_two_title="线程数量" :value_two="props.data.threads + '线程'"
            value_three_title="插槽类型" :value_three="props.data.socket_type" :addAssStore_index="addAssStore.cpu_index" />

        <ContentItem v-else-if="tabStore.assembly_type === 'GPU'" :title="props.data.codeName" :data="props.data"
            value_one_title="显存容量" :value_one="props.data.gpuCapacity + 'GB'" value_two_title="显存类型"
            :value_two="props.data.gpuType" value_three_title="显存频率" :value_three="props.data.memoryFrequency + 'MHz'"
            :addAssStore_index="addAssStore.gpu_index" />

        <ContentItem v-else-if="tabStore.assembly_type === '主板'" :title="props.data.series" :data="props.data"
            value_one_title="CPU插槽" :value_one="props.data.cpu_slot" value_two_title="内存类型"
            :value_two="props.data.memory_sum + '×' + props.data.memory_type + 'DIMM'" value_three_title="内存容量"
            :value_three="props.data.capacity + 'GB'" :addAssStore_index="addAssStore.mainboard_index" />

        <ContentItem v-else-if="tabStore.assembly_type === '内存'" :title="props.data.manufacturers" :data="props.data"
            value_one_title="内存容量" :value_one="props.data.capacity + 'GB'" value_two_title="内存类型"
            :value_two="props.data.type + 'DIMM'" value_three_title="内存频率" :value_three="props.data.frequency + 'MHz'"
            :addAssStore_index="addAssStore.memory_index" />

        <ContentItem v-else-if="tabStore.assembly_type === '固态硬盘'" :title="props.data.manufacturers" :data="props.data"
            value_one_title="内存容量" :value_one="props.data.capacity + 'TB'" value_two_title="接口类型"
            :value_two="props.data.interfaceType" value_three_title="读写速度"
            :value_three="props.data.r_speed + '|' + props.data.w_speed + 'GB/s'"
            :addAssStore_index="addAssStore.ssd_index" />

        <ContentItem v-else-if="tabStore.assembly_type === '硬盘'" :title="props.data.manufacturers" :data="props.data"
            value_one_title="内存容量" :value_one="props.data.capacity + 'GB'" value_two_title="接口类型"
            :value_two="props.data.interfaceType" value_three_title="缓存容量" :value_three="props.data.cache + 'GB'"
            :addAssStore_index="addAssStore.hdd_index" />
    </div>
</template>

<script setup lang="ts">
import ContentItem from './content/ContentItem.vue';
import { defineProps } from 'vue';
import { useTabStore } from '@/store/useTabStore';
import { useAddAssStore } from '@/store/useAddAssStore';
const addAssStore = useAddAssStore();
const tabStore = useTabStore();
const props = defineProps({

    data: {} as any,
})

</script>

<style scoped lang="scss"></style>